<template>
  <div :class="[card.modifysign === '2' ? 'mycard green' : 'mycard red']" @click="go">
    <div>
      <p class="mycard_header">
        {{card.inv}}
      </p>
      <div class="mycard_footer">
        <div class="mycard_footer-fund">{{card.subconam || 0}}万元</div>
        <div :class="[card.modifysign === '2'? 'mycard_footer-green' : 'mycard_footer-grey']">{{card.modifysign === '2'? '信息已保存' : '信息未填写'}}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['card'],
  methods: {
    go() {
      if (this.card.invtype === '20') {
        this.$router.push({ name: 'PersonInvEdit', query: {invid: this.card.invid} })
      } else {
        this.$router.push({ name: 'EntInvEdit', query: {invid: this.card.invid} })
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.green {
  background: #1aa766;
  border: 1px solid #dedede;
}
.red {
  background: #f86034;
  border: 1px solid #dedede;
}
.mycard {
  >div {
    margin-left: 0.27rem;
    padding: 0.36rem 0.36rem 0.36rem 0.72rem;
    background: #fff;
  }
  &_header {
    font-size: 0.72rem;
    font-weight: 700;
    margin: 0.16rem 0;
  }
  &_footer {
    display: flex;
    justify-content: space-between;
    line-height: 1;
    >div {
      &:last-child {
        font-size: 0.5rem;
      }
    }
    &-fund {
      color: #f86034;
    }
    &-grey {
      color: #aaa;
    }
    &-green {
      color: #1aa766;
    }
  }
}
</style>
